package com.itheima.reggie.controller;

import com.itheima.reggie.common.ResultInfo;
import com.itheima.reggie.service.SetmealService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class SetmealController {
    @Autowired
    private SetmealService setmealService;


    //套餐分页查询
    @GetMapping("/setmeal/page")
    public ResultInfo findall(@RequestParam("page")Integer pageNum,
                              @RequestParam("pageSize")Integer pageSize
    ){

      return ResultInfo.success( setmealService.findall(pageNum,pageSize));
    }




}
